﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterAdmin.Master" AutoEventWireup="true" CodeBehind="QuanLyKhachHang.aspx.cs" Inherits="EC21_EDiamond.QuanLyKhachHang1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <table style="width: 100%;">
        <tr>
            <td colspan="2" class="text-center" style="font-size: xx-large; color: #000000"><strong>QUẢN LÝ KHÁCH HÀNG</strong></td>
        </tr>
        <tr>
            <td style="width: 468px; text-align: right;" class="text-right">Tài Khoản:</td>
            <td class="text-left">
                <asp:TextBox ID="txtTaiKhoan" runat="server" Width="170px" placeholder="Tên Tài Khoản"></asp:TextBox>
            &nbsp;
                <asp:Button ID="btnTimKiem" runat="server" CausesValidation="False" OnClick="btnTimKiem_Click" Text="Tìm Kiếm" />
            </td>
        </tr>
        <tr>
            <td style="width: 468px; text-align: right;" class="text-right">Tên Khách Hàng:</td>
            <td class="text-left">
                <asp:TextBox ID="txtTenUser" runat="server" Width="170px" placeholder="Tên Khách Hàng"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtTenUser" ErrorMessage="Không để trống!" style="color: #FF0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="width: 468px; text-align: right;" class="text-right">Địa Chỉ:</td>
            <td class="text-left">
                <asp:TextBox ID="txtDiaChi" runat="server" Width="170px" placeholder="Địa Chỉ Khách Hàng"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtDiaChi" ErrorMessage="Không để trống!" style="color: #FF0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="width: 468px; text-align: right; height: 26px;" class="text-right">Mã Tỉnh:</td>
            <td style="height: 26px" class="text-left">
                <asp:DropDownList ID="drpTinh" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 468px; text-align: right;" class="text-right">Số Điện Thoại:</td>
            <td class="text-left">
                <asp:TextBox ID="txtDienThoai" runat="server" Width="170px" placeholder="Số Điện Thoại"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtDienThoai" ErrorMessage="Không để trống!" style="color: #FF0000"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtDienThoai" ErrorMessage="Số Điện Thoại Không Đúng!" style="color: #FF0000" ValidationExpression="^(0\d{9,10})"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="width: 468px; text-align: right;" class="text-right">Email:</td>
            <td class="text-left">
                <asp:TextBox ID="txtEmail" runat="server" Width="170px" placeholder="Địa Chỉ Email"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtEmail" ErrorMessage="Không để trống!" style="color: #FF0000"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtEmail" ErrorMessage="Địa Chỉ Email không hợp lệ!" style="color: #FF0000" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="width: 468px; height: 28px; text-align: right;" class="text-right">Tình Trạng:</td>
            <td style="height: 28px" class="text-left">
                <asp:DropDownList ID="drpTinhTrang" runat="server">
                    <asp:ListItem Value="1">Kích Hoạt</asp:ListItem>
                    <asp:ListItem Value="0">Chưa Kích Hoạt</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 468px; height: 48px;" class="text-right">
            </td>
            <td style="height: 48px" class="text-left">
                <asp:Button ID="btnCapNhat" runat="server" Text="Cập Nhật" OnClick="btnCapNhat_Click" Width="122px" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
        </tr>
        <tr>
            <td style="height: 48px; text-align: center;" class="text-right" colspan="2">
                <asp:GridView ID="grwDanhSachKhachHang" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="Black" GridLines="Horizontal" OnSelectedIndexChanging="grwDanhSachKhachHang_SelectedIndexChanging" style="text-align: left" Width="1057px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px">
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" SelectText="Chọn" />
                        <asp:BoundField DataField="makh" HeaderText="Mã KH" />
                        <asp:BoundField DataField="tenkh" HeaderText="Tên KH" />
                        <asp:BoundField DataField="username" HeaderText="Tài Khoản" />
                        <asp:BoundField DataField="diachi" HeaderText="Địa Chỉ" />
                        <asp:BoundField DataField="SDT" HeaderText="Số Điện Thoại" />
                        <asp:BoundField DataField="email" HeaderText="Email" />
                        <asp:BoundField DataField="matinh" HeaderText="Mã Tỉnh" />
                        <asp:BoundField DataField="tinhtrang" HeaderText="Tình Trạng" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F7F7F7" />
                    <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                    <SortedDescendingCellStyle BackColor="#E5E5E5" />
                    <SortedDescendingHeaderStyle BackColor="#242121" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
